import java.awt.Color;
import java.awt.Dimension;

import javax.swing.*;

public class SwingExample {
	
	/**
	 * Creates java frame window using swing.
	 */
	private static void createAndShowGUI(){
		JFrame frame = new JFrame("Swing Tester");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setPreferredSize(new Dimension(500,500));
		
		JLabel label = new JLabel("Hello World.");
		label.setForeground(new Color(255,0,255));
		frame.getContentPane().add(label);
		
		frame.pack();
		frame.setVisible(true);
		
		
	}
	
	/**
	 * 
	 * @param args
	 * 
	 * @description Main class.
	 */
	public static void main (String[] args){
		
		javax.swing.SwingUtilities.invokeLater(new Runnable(){
			public void run(){
				createAndShowGUI();
			}
		});
		
		
	}

}
